
var app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    imgurl: app.globalData.imgurl,
  },
  onLoad:function(e){
    this.getGoodlist(e);
  },
  onShow: function () {
  },
  getGoodlist:function(e){
    var that = this;
    wx.request({
      url: app.globalData.url + e.url,
      success:res=>{
        var goodlist = res.data
        that.setData({
          goodlist:goodlist
        })
      }
    })
  },
  goodDetail:function(e){
    var o = e.currentTarget.dataset
    wx.navigateTo({
      url: '/pages/list/detail/detail',
    })

  },
  // 回到首页
  backHome: function () {
    wx.switchTab({
      url: '/pages/index/index',
    })
  }
})